package com.congwulin.wechat.RabbitMQ;

import com.congwulin.wechat.entity.UserForWeChat;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
@RabbitListener(queues = "hello")
public class HelloReceiver {
    @RabbitHandler
    public void process(UserForWeChat user) {
        System.out.println("Receiver  : name:" + user.getName() + " age: " + user.getAge() + " id: "+ user.getId());
    }
}
